// Mock API封装
// 用于在开发阶段模拟后端接口，方便前端开发和测试

import { authMock, monitorMock, fishRecognitionMock, fishDiseaseMock, mockStatisticsWebSocket } from '@/utils/mock'
import {fishWeightApi} from '@/api/fishWeight'
// 认证相关Mock API
export const mockAuthApi = {
  // 发送短信验证码
  sendCode: (phoneNumber) => {
    return authMock.sendCode(phoneNumber)
  },

  // 用户注册
  register: (data) => {
    return authMock.register(data)
  },

  // 用户登录
  login: (data) => {
    return authMock.login(data)
  },

  // 重置密码
  resetPassword: (data) => {
    return authMock.resetPassword(data)
  }
}

// 监控相关Mock API
export const mockMonitorApi = {
  // 上传环境数据
  uploadEnvironmentData: (data) => {
    return monitorMock.uploadEnvironmentData(data)
  },

  // 查询环境数据列表
  getEnvironmentDataList: (params) => {
    return monitorMock.getEnvironmentDataList(params)
  },

  // 效益评估计算
  calculateBenefit: (params) => {
    return monitorMock.calculateBenefit(params)
  }
}

// 智慧识鱼相关Mock API
export const mockFishRecognitionApi = {
  // 获取最新识别记录
  getRecentRecords: () => {
    return fishRecognitionMock.getRecentRecords()
  },

  // 获取使用统计
  getStatistics: () => {
    return fishRecognitionMock.getStatistics()
  },

  // 获取最热搜索排行
  getHotRanking: () => {
    return fishRecognitionMock.getHotRanking()
  },

  // 获取鱼类画像
  getFishProfiles: () => {
    return fishRecognitionMock.getFishProfiles()
  }
}

// 鱼病智慧诊断相关Mock API
export const mockFishDiseaseApi = {
  // 评估网箱健康状态
  healthCheck: (data) => {
    return fishDiseaseMock.healthCheck(data)
  },

  // 获取专家列表
  getExpertList: () => {
    return fishDiseaseMock.getExpertList()
  },

  // 获取鱼病识别记录
  getDiseaseList: () => {
    return fishDiseaseMock.getDiseaseList()
  }
}

export const mockFishWeightApi = {
  // 获取最新记录
  getLatestRecord: () => {
    return fishWeightApi.getLatestRecord()
  },
}

// 统一导出Mock API
export default {
  authApi: mockAuthApi,
  monitorApi: mockMonitorApi,
  fishRecognitionApi: mockFishRecognitionApi,
  fishDiseaseApi: mockFishDiseaseApi,
  fishWeightApi: mockFishWeightApi,
  statisticsWebSocket: mockStatisticsWebSocket
} 